Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocked network calls made in SSRFVulnerabilityTest. #447

Conversation

tkomlodi
Copy link
Contributor

Re issue #445.

The fix simply mocks the two network requests that happen from the SSRFVulnerabilityTest test. I tried to keep the changes to a minimum, especially to the SSRFVulnerability class. Here I simply moved the network call out to a new getResponseForURLConnection() call, mostly unchanged. This is the method that is mocked from the test.

I ran into some strange Mockito spy behavior which forced the creation of the interim ssrfSpy variable.

Thanks!

Copy link
Member

@preetkaran20 preetkaran20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for the PR.

@preetkaran20 preetkaran20 merged commit 98cecd1 into SasanLabs:master Oct 27, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants